package com.demo.bean;

import org.springframework.beans.factory.BeanNameAware;
import org.springframework.stereotype.Service;

/**
 * 描述：
 *
 * @author lida
 * @time 2019/10/14 15:02
 */
@Service("johnMayer")
public class NamedSinger implements BeanNameAware {

	private String name;

	@Override
	public void setBeanName(String name) {
		this.name = name;
	}
	public void sing(){
		System.out.println("Singer " + name + " - sing()");
	}
}
